package com.acme.task2;

public class Foo {

    private int id;

    public Foo(final int i) {
         id = i;
    }

    @Override
    protected void finalize() throws Throwable {
        //print to console that finalize() was called
        super.finalize();
        System.out.println("finalize id = " + id);
    }
}
